﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:WP7UIKit.Controls">
    <Style TargetType="local:WaterFallList">
        <Setter Property="Background" Value="{StaticResource PhoneForegroundBrush}" />
        <Setter Property="Foreground" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:WaterFallList">
                    <ScrollViewer x:Name="ListScroller"
                                  Background="{TemplateBinding Background}"
                                  CacheMode="BitmapCache">
                        <StackPanel x:Name="ContainerStack" Orientation="Vertical">
                            <TextBlock x:Name="TopFreshControl"
                                       HorizontalAlignment="Center"
                                       Foreground="Black"
                                       Text="释放加载数据..."
                                       Visibility="Collapsed" />
                            <ContentPresenter x:Name="HeaderContent"
                                              CacheMode="BitmapCache"
                                              Content="{TemplateBinding Header}"
                                              ContentTemplate="{TemplateBinding HeaderTemplate}" />
                            <Grid x:Name="ItemsPresenterHost" CacheMode="BitmapCache">
                                <ItemsPresenter x:Name="ItemsPresenter" />
                            </Grid>
                            <TextBlock x:Name="BottomFreshControl"
                                       HorizontalAlignment="Center"
                                       Foreground="Black"
                                       Text="加载中..."
                                       Visibility="Collapsed" />
                        </StackPanel>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <Grid />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>